<template>
	<div>
		<h2>this is index </h2>
		<h4>b = {{b}}</h4>
		<h4>a = {{a}} </h4>
		<nuxt></nuxt>
	</div>
</template>

<script>
	export default {
		name: 'IndexPage',
		// middleware: 'auth'
		middleware() {
			console.log("this is page middleware")
			// console.log(window)
		},
		validate({
			query,
			params
		}) {
			console.log(query)
			console.log(params)
			console.log("this is validate")
			return true
		},
		asyncData(context) {
			console.log("asyncData")
			// console.log(context)
			return {
				a: 5
			}
		},
		fetch({
			store
		}) {
			console.log("fetch")
		},
		beforeCreate() {
			console.log("beforeCreate")
		},
		created() {
			console.log("created")
		},
		data() {
			return {
				b: 6
			}
		}
	}
</script>
<style>
  .test-enter-active, .test-leave-active{
    transition: 2s ease all;
  }

  .test-enter, .test-leave-active{
    margin-left: -500px;
  }
</style>
